package com.ldxiwxr.controller.controller.article;

import com.ldxiwxr.system.entity.article.ArticleCategory;
import com.ldxiwxr.system.entity.article.Link;
import com.ldxiwxr.system.service.IArticleCategoryService;
import com.ldxiwxr.system.service.ILinkService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/info")
public class InfoController {

    @Resource
    private ILinkService linkService;

    @Resource
    private IArticleCategoryService articleCategoryService;

    @GetMapping("/getLinks")
    public List<Link> getLinks() {
        return linkService.getLinks();
    }

    @GetMapping("/getCategorys")
    public List<ArticleCategory> getCategorys() {
        return articleCategoryService.getCategoryList();
    }
}
